
#pragma once
#include "stdafx.h"

class IDrawTool{
	
public:
	CDC* dc;
	COLORREF oldColor;
	CBrush *oldBrush;
	CBrush newBrush;

	IDrawTool(CDC* aDC=NULL){
		this->dc = aDC;
	}
	bool changeBkColor(COLORREF newColor){
		this->oldColor = this->dc->SetBkColor(newColor);
		this->newBrush.CreateSolidBrush(newColor);
		this->oldBrush = this->dc->SelectObject(&newBrush);
		return true;
	}

	bool revertColor(){
		this->dc->SetBkColor( this->oldColor );
		this->dc->SelectObject( oldBrush );
		return true;
	}

};
